package marchsoft.modules.system.mapper;

import marchsoft.base.BasicMapper;
import marchsoft.modules.system.entity.DictTYpe;
import org.apache.ibatis.annotations.Select;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component
@CacheConfig(cacheNames = "dict")
public interface DictTypeMapper extends BasicMapper<DictTYpe> {


    @Cacheable(key = "'id:' + #p0")
    DictTYpe selectById(Long id);

    @Select("select t.id,t.dict_type_name ,t.dict_type_code  from sys_dict_type t;")
    @Cacheable(key = "'id:all")
    List<DictTYpe> selectAll();

}
